package 数组练习题;
/*要求使用char数组存储26个英文字母，并分别用正序和逆序方式显示输出。要求10个一行。*/
public class Demo7 {
    public static void main(String[] args) {
        char[] len=new char[26];
        for (int i = 0; i < len.length; i++){
            len[i]= (char) ('a'+i);
        }
        System.out.println("小写字母正序排序:");
        for (int i = 0; i < len.length; i++){
            System.out.print(len[i]+"\t");
            if (i%10==9){
                System.out.println();
            }
        }
        System.out.println();
        int count=0;
        System.out.println("小写字母逆序排序:");
        for(int i=len.length-1;i>=0;i--){
            count++;
            System.out.print(len[i]+"\t");
            if (count%10==0){
                System.out.println();
            }
        }
    }
}
